/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package com.oea.struts.forms;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionMapping;
import org.apache.struts.action.ActionMessage;

/**
 *
 * @author DELL
 */
public class AddTeachingSchemeForm extends org.apache.struts.action.ActionForm {

    private String branch, subname;
    private int semester, theoryhours, practicalhours, tutorialhours, credit, division;
    private Long subcode;

    public String getBranch() {
        return branch;
    }

    public int getDivision() {
        return division;
    }

    public void setDivision(int division) {
        this.division = division;
    }

    public void setBranch(String branch) {
        this.branch = branch;
    }

    public String getSubname() {
        return subname;
    }

    public void setSubname(String subname) {
        this.subname = subname;
    }

    public int getSemester() {
        return semester;
    }

    public void setSemester(int semester) {
        this.semester = semester;
    }

    public int getTheoryhours() {
        return theoryhours;
    }

    public void setTheoryhours(int theoryhours) {
        this.theoryhours = theoryhours;
    }

    public int getPracticalhours() {
        return practicalhours;
    }

    public void setPracticalhours(int practicalhours) {
        this.practicalhours = practicalhours;
    }

    public int getTutorialhours() {
        return tutorialhours;
    }

    public void setTutorialhours(int tutorialhours) {
        this.tutorialhours = tutorialhours;
    }

    public int getCredit() {
        return credit;
    }

    public void setCredit(int credit) {
        this.credit = credit;
    }

    public Long getSubcode() {
        return subcode;
    }

    public void setSubcode(Long subcode) {
        this.subcode = subcode;
    }

    /**
     *
     */
    public AddTeachingSchemeForm() {
        super();
        // TODO Auto-generated constructor stub
    }

    /**
     * This is the action called from the Struts framework.
     *
     * @param mapping The ActionMapping used to select this instance.
     * @param request The HTTP Request we are processing.
     * @return
     */
    public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
        ActionErrors errors = new ActionErrors();
//        if (getName() == null || getName().length() < 1) {
//            errors.add("name", new ActionMessage("error.name.required"));
//            // TODO: add 'error.name.required' key to your resources
//        }
        return errors;
    }
}
